package com.partner.boot;

import com.partner.boot.netty.CoordinationNettyServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;

@EnableCaching
@SpringBootApplication
@MapperScan("com.partner.boot.mapper")
public class PartnerBackApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(PartnerBackApplication.class, args);
        System.out.println("后台接口地址：http://localhost:9090/swagger-ui/index.html");
    }

    @Autowired
    private CoordinationNettyServer nettyServer;

    @Override
    public void run(String... args) throws Exception {
        nettyServer.start();
    }
}
